class NoUserURLFilters {

    def filters = {
        all(controller:'*', action:'*') {
            before = {
            	if(!session.user && (actionName in ['save','delete','disable','enable','adminTask', 'rate', 'updatePassword', 'updateProfile', 'updateFile'])){
        			log.debug("Acceso denegado a: ${controllerName}/${actionName}")
        			render(view:"/noAccess")
        			return false
            	}
        		return true
            }
            
            after = {
                return true
            }
            afterView = {
                return true
            }
        }
    }
    
}
